3.453 \(\int (a+b \sec ^3(e+f x)) \tan ^3(e+f x) \, dx\)

Optimal. Leaf size=61 \[ \frac{a \sec ^2(e+f x)}{2 f}+\frac{a \log (\cos (e+f x))}{f}+\frac{b \sec ^5(e+f x)}{5 f}-\frac{b \sec ^3(e+f x)}{3 f} \]

[Out]

(a*Log[Cos[e + f*x]])/f + (a*Sec[e + f*x]^2)/(2*f) - (b*Sec[e + f*x]^3)/(3*f) + (b*Sec[e + f*x]^5)/(5*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0544285, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4138, 1802} \[ \frac{a \sec ^2(e+f x)}{2 f}+\frac{a \log (\cos (e+f x))}{f}+\frac{b \sec ^5(e+f x)}{5 f}-\frac{b \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^3)*Tan[e + f*x]^3,x]

[Out]

(a*Log[Cos[e + f*x]])/f + (a*Sec[e + f*x]^2)/(2*f) - (b*Sec[e + f*x]^3)/(3*f) + (b*Sec[e + f*x]^5)/(5*f)

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin{align*} \int \left (a+b \sec ^3(e+f x)\right ) \tan ^3(e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1-x^2\right ) \left (b+a x^3\right )}{x^6} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{b}{x^6}-\frac{b}{x^4}+\frac{a}{x^3}-\frac{a}{x}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=\frac{a \log (\cos (e+f x))}{f}+\frac{a \sec ^2(e+f x)}{2 f}-\frac{b \sec ^3(e+f x)}{3 f}+\frac{b \sec ^5(e+f x)}{5 f}\\ \end{align*}

Mathematica [A]  time = 0.135557, size = 59, normalized size = 0.97 \[ \frac{a \left (\tan ^2(e+f x)+2 \log (\cos (e+f x))\right )}{2 f}+\frac{b \sec ^5(e+f x)}{5 f}-\frac{b \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^3)*Tan[e + f*x]^3,x]

[Out]

-(b*Sec[e + f*x]^3)/(3*f) + (b*Sec[e + f*x]^5)/(5*f) + (a*(2*Log[Cos[e + f*x]] + Tan[e + f*x]^2))/(2*f)

________________________________________________________________________________________

Maple [B]  time = 0.05, size = 126, normalized size = 2.1 \begin{align*}{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{2}a}{2\,f}}+{\frac{a\ln \left ( \cos \left ( fx+e \right ) \right ) }{f}}+{\frac{b \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{5\,f \left ( \cos \left ( fx+e \right ) \right ) ^{5}}}+{\frac{b \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{15\,f \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}-{\frac{b \left ( \sin \left ( fx+e \right ) \right ) ^{4}}{15\,f\cos \left ( fx+e \right ) }}-{\frac{b\cos \left ( fx+e \right ) \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{15\,f}}-{\frac{2\,b\cos \left ( fx+e \right ) }{15\,f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^3)*tan(f*x+e)^3,x)

[Out]

1/2/f*a*tan(f*x+e)^2+a*ln(cos(f*x+e))/f+1/5/f*b*sin(f*x+e)^4/cos(f*x+e)^5+1/15/f*b*sin(f*x+e)^4/cos(f*x+e)^3-1
/15/f*b*sin(f*x+e)^4/cos(f*x+e)-1/15/f*b*cos(f*x+e)*sin(f*x+e)^2-2/15/f*b*cos(f*x+e)

________________________________________________________________________________________

Maxima [A]  time = 1.39281, size = 69, normalized size = 1.13 \begin{align*} \frac{30 \, a \log \left (\cos \left (f x + e\right )\right ) + \frac{15 \, a \cos \left (f x + e\right )^{3} - 10 \, b \cos \left (f x + e\right )^{2} + 6 \, b}{\cos \left (f x + e\right )^{5}}}{30 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^3,x, algorithm="maxima")

[Out]

1/30*(30*a*log(cos(f*x + e)) + (15*a*cos(f*x + e)^3 - 10*b*cos(f*x + e)^2 + 6*b)/cos(f*x + e)^5)/f

________________________________________________________________________________________

Fricas [A]  time = 0.526663, size = 157, normalized size = 2.57 \begin{align*} \frac{30 \, a \cos \left (f x + e\right )^{5} \log \left (-\cos \left (f x + e\right )\right ) + 15 \, a \cos \left (f x + e\right )^{3} - 10 \, b \cos \left (f x + e\right )^{2} + 6 \, b}{30 \, f \cos \left (f x + e\right )^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^3,x, algorithm="fricas")

[Out]

1/30*(30*a*cos(f*x + e)^5*log(-cos(f*x + e)) + 15*a*cos(f*x + e)^3 - 10*b*cos(f*x + e)^2 + 6*b)/(f*cos(f*x + e
)^5)

________________________________________________________________________________________

Sympy [A]  time = 4.4262, size = 82, normalized size = 1.34 \begin{align*} \begin{cases} - \frac{a \log{\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac{a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac{b \tan ^{2}{\left (e + f x \right )} \sec ^{3}{\left (e + f x \right )}}{5 f} - \frac{2 b \sec ^{3}{\left (e + f x \right )}}{15 f} & \text{for}\: f \neq 0 \\x \left (a + b \sec ^{3}{\left (e \right )}\right ) \tan ^{3}{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**3)*tan(f*x+e)**3,x)

[Out]

Piecewise((-a*log(tan(e + f*x)**2 + 1)/(2*f) + a*tan(e + f*x)**2/(2*f) + b*tan(e + f*x)**2*sec(e + f*x)**3/(5*
f) - 2*b*sec(e + f*x)**3/(15*f), Ne(f, 0)), (x*(a + b*sec(e)**3)*tan(e)**3, True))

________________________________________________________________________________________

Giac [B]  time = 1.8401, size = 394, normalized size = 6.46 \begin{align*} -\frac{60 \, a \log \left (-\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right ) - 60 \, a \log \left ({\left | -\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 1 \right |}\right ) + \frac{137 \, a + 16 \, b + \frac{805 \, a{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{80 \, b{\left (\cos \left (f x + e\right ) - 1\right )}}{\cos \left (f x + e\right ) + 1} + \frac{1730 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac{80 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac{1730 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac{240 \, b{\left (\cos \left (f x + e\right ) - 1\right )}^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac{805 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + \frac{137 \, a{\left (\cos \left (f x + e\right ) - 1\right )}^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}}{{\left (\frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 1\right )}^{5}}}{60 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^3)*tan(f*x+e)^3,x, algorithm="giac")

[Out]

-1/60*(60*a*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1) - 60*a*log(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) +
 1) - 1)) + (137*a + 16*b + 805*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 80*b*(cos(f*x + e) - 1)/(cos(f*x + e
) + 1) + 1730*a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 80*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 1
730*a*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 240*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 805*a*(cos
(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 137*a*(cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5)/((cos(f*x + e) - 1)/(
cos(f*x + e) + 1) + 1)^5)/f